
using System;

namespace Camalon.ColorPicker 
{

	// This class stores all relevant RGB data.
	internal struct RGB 
	{
		// private data fields
		private int _red;
		private int _green;
		private int _blue;


		/// <summary>
		/// Constructor. Provides initial values for the coordinates in the
		/// RGB color space.
		/// </summary>
		/// <param name="red">The red coordinate.</param>
		/// <param name="green">The green coordinate.</param>
		/// <param name="blue">The blue coordinate.</param>
		public RGB( int red, int green, int blue ) 
		{
			_red = red;
			_green = green;
			_blue = blue;

		}


		/// <summary>
		/// Gets or sets the red coordinate.
		/// </summary>
		public int Red 
		{
			get { return _red; }
		}

		/// <summary>
		/// Gets or sets the green coordinate.
		/// </summary>
		public int Green {
			get { return _green; }
		}

		/// <summary>
		/// Gets or sets the blue coordinate.
		/// </summary>
		public int Blue {
			get { return _blue; }
		}

		public bool IsEqual(RGB rgb)
		{
			return 
				this._red	== rgb._red && 
				this._green == rgb._green && 
				this._blue	== rgb._blue;
		}


	} 

} 
